package com.zhiyou.service.imp;

import java.util.HashMap;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zhiyou.mapper.ParentMapper;
import com.zhiyou.model.FYParent;

import com.zhiyou.service.parentsService;

@Service
public class ParentsServiceImp implements parentsService {

	@Autowired
	ParentMapper mapper;
	
	public FYParent loginParent(String partent_phone, String partent_password) {
		// TODO Auto-generated method stub
		return mapper.loginParent(partent_phone, partent_password);
	}
	/*	//家长登录
		public Map<FYParent, String> Plogin(String partent_phone, String partent_password){
		Map<FYParent, String> map = new HashMap<FYParent, String>();
		 FYParent loginParent = mapper.loginParent(partent_phone, partent_password);
			 map.put(loginParent, loginParent==null?"登录失败！":"登陆成功！");
			return map;
		}*/

	public List<FYParent> selectAllParent() {
		// TODO Auto-generated method stub
		return mapper.selectAllParent();
	}

	public FYParent selectByParentid(int parent_id) {
		// TODO Auto-generated method stub
		return mapper.selectByParentid(parent_id);
	}
	public void updatePpass(FYParent parent) {
		mapper.updatePpass(parent);
		
	}
	public void updatePpho(FYParent parent) {
		mapper.updatePpho(parent);
		
	}



}
